import axios from '@/libs/api.request'

/**
 * 获取表格数据
 * @return {[type]}        [description]
 */
export const tableData = (params) => {
  return axios.request({
    url: '/api/forecast/getMeterListPaged',
    method: 'get',
    params
  })
}
/**
 * 获取矩形方图数据
 * @return {[type]}        [description]
 */
export const rectTreeMap = (params) => {
  return axios.request({
    url: '/api/meterManage/meyerQuery/getMeterGasCalssCountByYear',
    method: 'get',
    params
  })
}

/**
 * 表具详情
 * @return {[type]}        [description]
 */
export const meterDetail = (id) => {
  return axios.request({
    url: '/api/meterManage/meyerQuery/getMeterBeanByMeterId/' + id,
    method: 'get'
  })
}

/**
 * desc: 获取中间区域箱线图数据
 * param {type}
 * return:
 */
export const ajaxEBoxlineData = (params) => {
  return axios.request({
    url: '/api/gasLaw/getMeterGasByHours',
    method: 'get',
    params
  })
}

/**
 * 3d柱状图数据
 * @return {[type]}        [description]
 */
export const eBar3d = (params) => {
  return axios.request({
    url: '/api/gasLaw/getMeterGasByHoursSection',
    method: 'get',
    params
  })
}

/**
 * 获取表具对应的保存信息
 * @return {[type]}        [description]
 */
export const paramsByMeterId = (params) => {
  return axios.request({
    url: '/api/gasLaw/getGasLawParamByMeterId',
    method: 'get',
    params
  })
}

/**
 * 保存信息
 * @return {[type]}        [description]
 */
export const saveParamsByMeterId = (data) => {
  return axios.request({
    url: '/api/gasLaw/insertGasLawParam',
    method: 'post',
    data
  })
}

/**
 * desc: 获取k线图数据
 * param {type}
 * return: void
 */
export const getJhData = (params) => {
  return axios.request({
    url: '/api/gasLaw/getClusteringByMeterId',
    method: 'get',
    params
  })
}
